b27d47141097190b01efdb99a81405b3f022fcde,wicket/src/main/java/wicket/markup/html/PackageResource.java,PackageResource,PackageResource,#Class#String#Locale#String#,269

Before Change


			final String style)
	{
		// Convert resource path to absolute path relative to base package
		this.absolutePath = Packages.absolutePath(scope, path);

		IPackageResourceGuard guard = Application.get().getResourceSettings()
				.getPackageResourceGuard();

After Change


			final String style)
	{
		// Convert resource path to absolute path relative to base package
		String absolutePath = Packages.absolutePath(scope, path);

		IPackageResourceGuard guard = Application.get().getResourceSettings()
				.getPackageResourceGuard();
		if (!guard.accept(scope, path))
		{
			throw new PackageResourceBlockedException("package resource " + absolutePath
					+ " may not be accessed");
		}

		int index = absolutePath.lastIndexOf(".");
		if (index != -1)
		{
			extension = absolutePath.substring(index+1);
			absolutePath = absolutePath.substring(0,index);